home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12215 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  30 lines

  1. Newsgroups: comp.lang.c++
  2. Path: netcom.com!gibson
  3. From: gibson@netcom.com (Bob Gibson)
  4. Subject: Re: STL multimap question
  5. Message-ID: <gibsonDoHFvE.6sM@netcom.com>
  6. Organization: A number of persons or groups united for some purpose
  7. X-Newsreader: TIN [version 1.2 PL1]
  8. References: <4i9e8b$9p0@sundog.tiac.net>
  9. Date: Mon, 18 Mar 1996 21:33:13 GMT
  10. Sender: gibson@netcom11.netcom.com
  11.  
  12. Linda Kasparek (lindak@pumpkin.iii.net) wrote:
  13. : I am adding integer keys, of which some are duplicates, to an STL
  14. : multimap.  If I were to iterate through one of those duplicate keys,
  15. : would I be guaranteed to receive the keys in the order they were added?  
  16.  
  17. Note: please use shorter lines.
  18.  
  19. Answer: nope.  If you look into how multimap is implemented, it uses
  20. a red-black tree, which does not maintain insertion order.
  21. -- 
  22. Bob Gibson -- gibson@netcom.com
  23. +----------------------------------------------------------------------+
  24. | Microsoft Network is prohibited from redistributing this work in any |
  25. | form, in whole or in part without license.  License to distribute    |
  26. | this work is available to Microsoft at $500.  Transmission without   |
  27. | permission constitutes an agreement to these terms.                  |
  28. |     Premission is hereby granted to duplicate this restriction.      |
  29. +----------------------------------------------------------------------+
  30.